// 景区管理
import request from "@/utils/request";

// 1 新增景区
export function addjingQuApi(data) {
  return request({
    url: "/bs/jingqu/save",
    method: "post",
    data,
  });
}

// 2 获取所有景区列表
export function jingQuListApi() {
  return request({
    url: "/bs/jingqu/getList",
    method: "get",
  });
}

// 3 导出
export function jingquExportApi(params) {
  return request({
    url: "/bs/jingqu/export",
    method: "get",
    params,
  });
}

// 4 停止预约
export function stopOrderApi(jingquId) {
  return request({
    url: `/bs/jingqu/switch/${jingquId}`,
    method: "get",
  });
}

// 5 景区分页
export function jingQuPageApi(params) {
  return request({
    url: "/bs/jingqu/page",
    method: "get",
    params,
  });
}

// 6 删除景区
export function delJingQuApi(ids) {
  return request({
    url: `/bs/jingqu/delete/${ids}`,
    method: "delete",
  });
}

// 6 根据景区的ID获取下面的所有景点
export function getJingDianByJingQuIdApi(JingQuId) {
  return request({
    url: `/bs/jingqu/jingdian/getJingDianByJingQuId/${JingQuId}`,
    method: "get",
  });
}

// 7 修改景区
export function updatejingQuApi(data) {
  return request({
    url: "/bs/jingqu/update",
    method: "put",
    data,
  });
}

// 景区类型
export function getJingTypeApi() {
  return request({
    url: `/bs/jingqu/type`,
    method: "get",
  });
}
